using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

using BouncinBall;


namespace BouncinBall.Components
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class Shadow : VisibleComponent
    {
        public const string TEXTURE_FILENAME = "shadow_480x480";

        public Utility.Position Position { get; set; }
        /// <summary>
        /// Get/Set shadow diameter
        /// </summary>
        public float Diameter
        {
            get { return _dia; }
            set
            {
                _dia = value;
                SetSpriteScale(_dia);
            }
        } //in meters
        private float _dia;

        #region Constructors

        public Shadow(Game game)
            : base(game, TEXTURE_FILENAME, BouncingBallGame.SHADOW_DEPTH)
        {
            // TODO: Construct any child components here
            Position = new Utility.Position();
            _dia = 0;
        }

        public Shadow(Game game, float diameter)
            : this(game)
        {
            _dia = diameter; //cannot use Setter because texture not loaded yet
        }

        #endregion Constructors

        #region Overrides

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            // TODO: Add your initialization code here

            base.Initialize();
        }

        protected override void LoadContent()
        {
            base.LoadContent();
        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
        }

        #endregion Overrides
    }
}
